package com.zsr.example.util.constants;

/**
 * @author zhousiren
 * @date 2022/2/11 16:27
 */
public enum BusinessEnum {
    COURSE(1, "录播课"),
    VOD(2, "小节视频"),
    ARTICLE(3, "图文课"),
    PATH(4, "学习路径");

    private final int type;

    private final String name;

    BusinessEnum(int type, String name) {
        this.type = type;
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public String getName() {
        return name;
    }


    public static String getDesc(int type) {
        for (BusinessEnum ele : values()) {
            if (ele.getType() == type) return ele.getName();
        }
        return null;
    }
}
